<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>

    function deepCope3(obj){
        let obj2 = Object.assign(obj);
        return obj2;
    }

    let obj = {name : '猪八戒',age : 2800};
    let obj2 = deepCope3(obj);
    console.log(obj,obj2);
    obj2.age = 1;
    console.log(obj,obj2);

    //只是实现了对象的第一层属性的拷贝, 本质上也是浅拷贝

</script>